#ifndef MAIN_H
#define MAIN_H 1



#include "stm32f10x.h"
#include "board_NVIC.h"
#include "board_gpio.h"
#include "board_uart.h"
#include "board_timer.h"
#include "board_ppm.h"
#include "board_filter.h"
#include "board_adc.h"
#include "board_i2c.h"
#include "board_types.h"
#include "board_bmp085.h"
#include "board_adxl345.h"
#include "board_hmc5883.h"
#include "board_l3g4200d.h"
#include "user_api_types.h"
#include "user_processing.h"
#include "user_serialization.h"
#include "user_pid.h"
#include "board_dma.h"


/* Size of board structure control_pid_est_t . Be carrefull. */
#define BOARD_STRUCTURE_SIZE  149   // 144 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'

/* Size of seansors raw data structure " sensor_raw_data_t ". Be carrefull. */
//Acc+Gyro+Mag
//#define SENSOR_RAW_DATA_SIZE  29   // 24 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'
//Acc+Gyro+Mag+Quaterion
//#define SENSOR_RAW_DATA_SIZE  45   // 24 + 16 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'
//Acc+Gyro+Mag+Quaterion+Euler_Angles
//#define SENSOR_RAW_DATA_SIZE  57   // 24 + 16 + 12 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'
//Acc+Gyro+Mag+Quaterion+Euler_Angles+PIDs
//#define SENSOR_RAW_DATA_SIZE  75   // 24 + 16 + 12 + 18 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'
//Acc+Gyro+Mag+Quaterion+Euler_Angles+PIDs+DynamicPID
#define SENSOR_RAW_DATA_SIZE  93   // 24 + 16 + 12 + 18 + 18 + 1 + 4 for '\n' 'D' 'A' 'T' 'A'

extern  uint8_t msg[SENSOR_RAW_DATA_SIZE];

void init_all( void);
void delay( unsigned int Val);

/* Checking for libs parameters. */
void assert_failed(uint8_t* file, uint32_t line);

#endif